package com.xomily.devops.service.impl;

import java.util.List;
import com.xomily.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xomily.devops.mapper.DevUrlLogMapper;
import com.xomily.devops.domain.DevUrlLog;
import com.xomily.devops.service.IDevUrlLogService;

/**
 * 服务日志Service业务层处理
 * 
 * @author xomily
 * @date 2021-11-29
 */
@Service
public class DevUrlLogServiceImpl implements IDevUrlLogService 
{
    @Autowired
    private DevUrlLogMapper devUrlLogMapper;

    /**
     * 查询服务日志
     * 
     * @param id 服务日志主键
     * @return 服务日志
     */
    @Override
    public DevUrlLog selectDevUrlLogById(Long id)
    {
        return devUrlLogMapper.selectDevUrlLogById(id);
    }

    /**
     * 查询服务日志列表
     * 
     * @param devUrlLog 服务日志
     * @return 服务日志
     */
    @Override
    public List<DevUrlLog> selectDevUrlLogList(DevUrlLog devUrlLog)
    {
        return devUrlLogMapper.selectDevUrlLogList(devUrlLog);
    }

    /**
     * 新增服务日志
     * 
     * @param devUrlLog 服务日志
     * @return 结果
     */
    @Override
    public int insertDevUrlLog(DevUrlLog devUrlLog)
    {
        devUrlLog.setCreateTime(DateUtils.getNowDate());
        return devUrlLogMapper.insertDevUrlLog(devUrlLog);
    }

    /**
     * 修改服务日志
     * 
     * @param devUrlLog 服务日志
     * @return 结果
     */
    @Override
    public int updateDevUrlLog(DevUrlLog devUrlLog)
    {
        return devUrlLogMapper.updateDevUrlLog(devUrlLog);
    }

    /**
     * 批量删除服务日志
     * 
     * @param ids 需要删除的服务日志主键
     * @return 结果
     */
    @Override
    public int deleteDevUrlLogByIds(Long[] ids)
    {
        return devUrlLogMapper.deleteDevUrlLogByIds(ids);
    }

    /**
     * 删除服务日志信息
     * 
     * @param id 服务日志主键
     * @return 结果
     */
    @Override
    public int deleteDevUrlLogById(Long id)
    {
        return devUrlLogMapper.deleteDevUrlLogById(id);
    }
}
